import request from "../utils/request"
const path = ""

// 词云
// 实际请求的是下面的地址
// https://www.fastmock.site/mock/a109f987145b9bc2364e0b549359aa7b/imooc-data/api/user/login
// export function wordcloud(params) {
//   return request({
//     url: path + "/wordcloud",
//     method: "get",
//     params,
//   })
// }
export const login = (data) =>
    request({
        url: '/user/login',
        method: "post",
        data,
        headers: {
        }
    })
export const wordcloud = (data, url, token) =>
    request({
        url: path + url,
        method: "post",
        data,
        headers: {
            Authorization: token,
        },
    })

export const httpGet = (data, url, token) =>
    request({
        url: path + url,
        method: "get",
        headers: {
            Authorization: token,
        },
        params: data,
    })

export function requestHttp(params, url) {
    return request({
        url: path + url,
        method: "post",
        headers: {
            "Content-Type": "application/json;charset=UTF-8",
        },
    })
}
